#ifndef __LIDAR06_AS
#define __LIDAR06_AS

#include <string.h>

#include "esp_system.h"
#include "esp_log.h"
#include "driver/uart.h"
#include "driver/gpio.h"

#include "freertos/FreeRTOS.h"
#include "freertos/task.h"

typedef struct {
	uint16_t distance;//距离
	uint8_t confidence;//置信度
} LidarPointStructDef;

typedef struct {
	uint8_t header;
	uint8_t ver_len;
	uint16_t speed;
	uint16_t start_angle;
	LidarPointStructDef point[12];
	uint16_t end_angle;
	uint16_t timestamp;
	uint8_t crc8;
} LiDARFrameTypeDef;

typedef struct
{
    void (* init)(void);
    LiDARFrameTypeDef LD_Data;
} LD06ClassStruct;

extern LD06ClassStruct LD06Class;

void LD06_init(void);

#endif
